package poswar.contribute.model;

import java.io.Serializable;
import java.util.Date;

import poswar.contribute.util.FriendModeManager;


public class Post implements Serializable {
	private static final long serialVersionUID = 1L;
	
	private String email;
	private Date date;
	private String contents;

	public Post() {		
	}
	
	public static Post build(String email, String contents) {
		Post post = new Post();
		post.date = new Date();
		post.email = email;
		post.contents = contents;
		
		return post;
	}
	
	public String getEmail() {
		return email;
	}

	public String getContents() {
		return contents;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public void setEmail(String email) {
		FriendModeManager.assertFriendAccess();
		this.email = email;
	}

	public void setContents(String contents) {
		FriendModeManager.assertFriendAccess();
		this.contents = contents;
	}

	
}
